package game.leon.engine.net.example.client;

import game.leon.engine.net.GateMessageHandler;
import game.leon.engine.net.GateSession;
import game.leon.engine.net.codec.GateRawMessage;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

/**
 * User: bianpeng
 * Date: 11-12-27
 */
@Component
public class ClientMessageHandler implements GateMessageHandler {
    private Logger logger = Logger.getLogger(getClass());
    @Override
    public void execute(GateSession session, GateRawMessage message) {
        logger.info(String.format("[client] user=%d, message=%d",
                message.getUserId(), message.getMessage()));
    }
}
